package com.kuang.operator;
//逻辑运算符
public class Demo05{
    public static void main(String[] args) {
        boolean a = true;
        boolean b = false;

        System.out.println("a&&b: "+(a&&b));//与 两个都真
        System.out.println("a||b: "+(a||b));//或 一个为真
        System.out.println("!(a&&b): "+!(a&&b));//非   相反

        //短路运算
        int c=5;
        boolean d=(c<4)&&(c++<4);
        System.out.println(d);
        System.out.println(c);

    }
}
